package com.keepers.repair.fragment;

import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;

import com.keepers.repair.helper.RxHelper;

/**
 * auth aboom
 * date 2018/10/22
 */
public class BaseFragment extends Fragment {

   protected RxHelper rxHelper = RxHelper.getHelper();

    @SuppressWarnings("unchecked")
    public <T extends View> T ff(int id) {
        return (T) LayoutInflater.from(getActivity()).inflate(id, null);
    }

    @SuppressWarnings("unchecked")
    public <T extends View> T f(View view, int id) {
        return (T) view.findViewById(id);
    }


    @Override
    public void onDestroy() {
        super.onDestroy();
        rxHelper.onDestroy();
    }
}
